#!/usr/bin/env python 
# -*- coding:utf-8 -*-

import qrcode

img = qrcode.make('http://www.baidu.com')
with open('test.png','wb') as f:
    img.save(f)